@import '../app/variables';
@import '../app/mixin';
/*自定义radio*/
.el-radio-group,
.el-radio {
  .el-radio__label {
    padding-left: 2px;
  }
  .el-radio__input.is-checked .el-radio__inner {
    border-color: $--color-primary;
    background: #fff;
    &::after {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  }
  .el-radio__input {
    display: inline-block;
    margin-right: 4px;
    white-space: nowrap;
    position: relative;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    .el-radio__inner {
      display: inline-block;
      width: 14px;
      height: 14px;
      position: relative;
      top: 0;
      left: 0;
      background-color: #fff;
      border: 1px solid #dcdee2;
      border-radius: 50%;
      transition: all 0.2s ease-in-out;
      &::after {
        position: absolute;
        width: 9px;
        height: 9px;
        left: 6px;
        top: 6px;
        border-radius: 6px;
        display: table;
        border-top: 0;
        border-left: 0;
        content: ' ';
        z-index: 1;
        background-color: $--color-primary;
        opacity: 0;
        transition: all 0.2s ease-in-out;
        transform: scale(0);
      }
    }
  }
}

/*form 表单*/
.el-form {
  .el-form-item {
    &.is-required {
      .el-form-item__label {
        //color: $--color-danger;
        &:before {
          //color: $--color-danger;
        }
      }
    }
  }
}

.el-popover--dark {
  background: rgb(88, 94, 107);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  padding: 4px;
  .popper__arrow {
    &::after {
      border-bottom-color: rgb(88, 94, 107) !important;
    }
  }
}

/*element ui提示框*/
.el-message {
  min-width: auto !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  background: #fff !important;

  .el-message__content {
    //@include text-ellipsis--muti(3);
    line-height: 1.1;
    //max-height: 100px;
    @include div--webkit--scrollbar(#ffb08f);
    padding-right: 14px;
    margin-right: 10px;
    box-sizing: border-box;
  }
  &.el-message--success {
    background: #edfff3 !important;
    color: $--color-success !important;
    border: 1px solid #bbf2cf !important;
  }
  &.el-message--warning {
    background: #fff9e6 !important;
    color: $--color-warning !important;
    border: 1px solid #ffd77a !important;
  }
  &.el-message--error {
    background: #ffefe6 !important;
    color: $--color-danger !important;
    border: 1px solid #ffcfb8 !important;
    .el-icon-close {
      color: #f44336;
      cursor: pointer;
    }
  }
  &.el-message--info {
    box-shadow: 0 1px 6px rgb(0 0 0 / 20%);
    .el-message__icon {
      display: none;
      margin-right: 0;
    }
    .el-message--loading {
      .bpf-icon-ios-loading {
        color: $--color-primary;
        animation: message-loading 0.8s linear infinite;
        margin-right: 6px;
        display: inline-block;
        backface-visibility: hidden;
      }
    }
    @keyframes message-loading {
      0% {
        transform: rotate(0);
        transform-origin: center center;
      }
      50% {
        transform: rotate(180deg);
        transform-origin: center center;
      }
      100% {
        transform: rotate(1turn);
        transform-origin: center center;
      }
    }
  }
}

/*element ui  table 自定义样式*/
/*element ui  table 自定义样式*/
.el-table {
  &.el-table--small {
    td {
      padding: 2px 0;
      box-sizing: border-box;
      height: 44px;
      .cell {
        font-size: 13px;
      }
    }
  }

  &.el-table--mini {
    td {
      padding: 2px 0;
      box-sizing: border-box;
      height: 40px;
      .cell {
        font-size: 13px;
      }
    }
  }

  .el-table__header {
    thead {
      tr {
        th {
          //font-weight: bold;
          //background: #eee;
          //height: 36px;
          font-size: 14px;
          box-sizing: border-box;
          position: relative;
          color: $--color-primary;
          background: transparent;
          &:before {
            content: '';
            opacity: 0.08;
            left: 0;
            position: absolute;
            top: 0;
            width: 100%;
            height: 100%;
            background: $--color-primary;
          }
        }
      }
    }
  }
  .el-table__body-wrapper {
    &::-webkit-scrollbar-thumb {
      background-color: #ddd;
    }
    &::-webkit-scrollbar {
      height: 14px; // 纵向滚动条 必写
    }
    &::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 12px #ddd;
    }
    &::-webkit-scrollbar-thumb:hover {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
}

/*提示框居中*/
.el-message-box {
  &.el-message-box--center {
    width: 380px;
  }
}

/*面包屑*/
.el-breadcrumb {
  position: relative;
  padding-left: 10px;
  //&::before {
  //  position: absolute;
  //  left: 0;
  //  content: '';
  //  width: 5px;
  //  top: -1px;
  //  height: 18px;
  //  background: $--color-primary;
  //}
}

/*table 表单展示*/
.el-form--table {
  margin-bottom: 15px;
  .el-row {
    display: flex;
    flex-wrap: wrap;
  }
  .el-form-item {
    height: 100%;
    display: flex;
    margin-bottom: 0;
    border: 1px solid #d7d1d1;
    border-top: none;
    border-right: none;
    .el-form-item__label {
      background: $--body-background-color;
      font-weight: bold;
      flex-shrink: 0;
      border-top: 1px solid #d7d1d1;
      border-right: 1px solid #d7d1d1;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      line-height: initial;
      min-height: 36px;
      padding: 5px 10px 5px 5px;
    }
    .el-form-item__content {
      margin-left: 0 !important;
      padding: 0 10px;
      flex: 1;
      border-top: 1px solid #d7d1d1;
      border-right: 1px solid #d7d1d1;
      border-bottom: none;
      display: flex;
      align-items: center;
      .el-form-item__text {
        padding: 5px 0;
        display: flex;
        min-height: 36px;
        line-height: initial;
        align-items: center;
        box-sizing: border-box;
      }
    }
  }
  .el-form-item--small {
    .el-form-item__label {
      min-height: 32px;
    }
    .el-form-item__content {
      .el-form-item__text {
        min-height: 32px;
      }
    }
  }
  .el-form-item--mini {
    .el-form-item__label {
      min-height: 28px;
    }
    .el-form-item__content {
      .el-form-item__text {
        min-height: 28px;
      }
    }
  }
}

/*el-dialog*/
.el-dialog {
  border-radius: 6px;
  background-clip: padding-box;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  .el-dialog__header {
    border-bottom: 1px solid $--color-primary; // #e8eaec
    position: relative;
    z-index: 1;
    padding: 12px 20px 12px;
    &:before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
      background: $--color-primary;
      opacity: 0.92;
    }
    .el-dialog__title {
      //color: #17233d;
      font-weight: 500;
      line-height: 20px;
      font-size: 16px;
      color: #fff;
    }
    .el-dialog__headerbtn {
      top: 12px;
      .el-dialog__close {
        color: #fff;
      }
    }
  }
  .el-dialog__body {
    padding: 12px;
  }
}

.el-dropdown-menu__item {
  position: relative;
  z-index: 1;
  &:not(.is-disabled):hover,
  &:focus {
    background-color: transparent;
    color: $--color-primary;
    &:after {
      content: '';
      position: absolute;
      width: 100%;
      left: 0;
      height: 100%;
      background-color: $--color-primary;
      opacity: 0.1;
      top: 0;
      z-index: -1;
    }
  }
}

.el-menu {
  /*阿里矢量图图标样式*/
  [class^='iconfont-pc bpf-icon-'] {
    vertical-align: middle;
    margin-right: 5px;
    width: 24px;
    text-align: center;
    font-size: 16px;
    display: inline-block;
  }
}
